package com.turtle3d.user.grammars;

import com.turtle3d.formallanguage.grammar.Grammar;
import com.turtle3d.formallanguage.grammar.parser.SimpleParser;
import com.turtle3d.formallanguage.symbol.Symbol;

public class SierpinskiPyramid extends Grammar
{

	@Override
	public void define()
	{	
		
		setAxiom(new Symbol("P"));
		setDefaultParameter("turnAngle", 45f);
		setDefaultParameter("pitchAngle", 45f);									
				
		addProduction(SimpleParser.parseProduction("P->\\\\[+F+[--//P]+F+[----//P]+F+[++//P]+F+[//P]++/F\\--//P]"));
		addProduction(SimpleParser.parseProduction("F->FF"));

	}

}
